#ifndef IMHISTORYMGRDLG_H
#define IMHISTORYMGRDLG_H

#include "../Biz/MsgBusParam/IMMessageParam.h"
#include <QDialog>
#include <QUrl>
using namespace wwbiz;

namespace Ui {
    class IMHistoryMgrDlg;
}

class IMHistoryMgrDlg : public QDialog
{
    Q_OBJECT

public:
    explicit IMHistoryMgrDlg(QWidget *parent = 0);
    ~IMHistoryMgrDlg();
    void InitContactList(const QStringList& allcontacts);

public slots:
    void InitHistoryData(MsgBusParam);
    void FilterConfigChanged(int);
    void FilterSelected(const QString&);
    void OnAnchorClicked(QUrl);

private slots:
    void on_searchEdit_returnPressed();

private:
    QString IMMessageToHtml(const IMTextMessage& msg);
    Ui::IMHistoryMgrDlg *ui;
    QStringList m_all_contacts;
    IMTextMessageVector m_all_history;
    QString  m_all_html;
    bool     m_searched;
};

#endif // IMHISTORYMGRDLG_H
